package com.hjl.spring6.bean.iocXml.life;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author ServivE
 * @version 0.1
 * @className TestLife1
 * @description
 * @date 2024/8/6 16:51
 * @since jdk11
 */
public class TestLife1 {
    @Test
    public void testLife1() {
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("bean-life.xml");
        User user = ac.getBean("user", User.class);
        System.out.println("生命周期： 6.bean对象就绪时");
        System.out.println(user);
        ac.close();//销毁

    }
}
